<script type="text/javascript">
var ws = new WebSocket("ws://localhost:5005");

ws.onopen = function(){
    console.log("握手成功");
	ws.send("Hello world!");
};
ws.onmessage = function(e){
    console.log("message:" + e.data);
	
	setTimeout(function() {
		ws.send("ddddd");
	}, 1000);
};
ws.onerror = function(){
    console.log("error");
};
</script>